home *** CD-ROM | disk | FTP | other *** search
/ Light ROM 1 / LIGHT-ROM 1 (Amiga Library Services)(1994).iso / ffdisks / d977.lha / Forth / Forth-Map.doc < prev    next >
Text File  |  1994-04-03  |  5KB  |  137 lines

  1.     Memory Usage by FORTH         910418  J.Bos Brantford Canada
  2.  
  3.   a3=bp  base pointer  
  4.   a4=ip  inner interpreter pointer
  5.   a5=sp  stack pointer (parameter stack = user stack = forth stack = stack )
  6.   a7=rp  return stack pointer ( return stack = system stack = Amiga stack )
  7.   d5=os  outside register, high word must be set to zero 0000  
  8.   d6=w   work register, high word must be set to zero 0000 
  9.  
  10.   : next,  bp ) jmp, ; ( next, jumps to what FORTH thinks is address 0000 )
  11.  
  12.    addr  contents      label 
  13.    0000   3c1c        >next<      move.w (a4)+,d6      ip )+ w move,        
  14.    0002   3a33  6800              move.w 0(a3,d6),d5   0 w bp di.l) os move,
  15.    0006   4ef3  5800              jmp    0(a3,d5)      0 os bp di.l) jmp,
  16.    000a   0000  0000  incomingSP
  17.    000e   4928 <-     init-forth    initial pointer to top in FORTH voc.
  18.    0010   f736 <      init-user     sp0     parameter stack address 
  19.    0012   f796 <                    r0      return stack address, not used 
  20.    0014   f736 <                    tib     terminal input buffer address 
  21.    0016   001f <                    width   name field width in bytes 
  22.    0018   0001 <                    warning error warning mode 
  23.    001a   0000 <      init-fence
  24.    001c   0000 <      init-dp       initial directory pointer 
  25.    001e   0000 <      init-voc-link initial vocabulary link 
  26.    0020   137c <      <-find>
  27.    0022   0710 <      <?terminal>
  28.    0024   1446 <      <abort>
  29.    0026   145e <      <block>
  30.    0028   14fe <      <cr>
  31.    002a   077c <      <exit>
  32.    002c   152e <      <expect>
  33.    002e   1654 <      <interpret>
  34.    0030   06ec <      <key>
  35.    0032   16ba <      <load>
  36.    0034   1722 <      <number>
  37.    0036   32b6 <      <page>
  38.    0038   17b6 <      <r/w>
  39.    003a   0736 <      <type>
  40.    003c   1848 <      <vocabulary79>
  41.    003e   1904 <      <word>
  42.    0040   f796        up      (user pointer )          
  43.    0042   f796        rpp     (return stack pointer, not used)
  44.        ----------------
  45.    0044   88 execbase     start of dictionary (first word)
  46.     |         |
  47.     |         |
  48.     |         |
  49.     |      dictionary    
  50.     |         |
  51.     |         |
  52.     |         |
  53.     |         v
  54.     |               <--  last entry in dictionary
  55.     |
  56.     |        pad  is located 64 bytes above the latest
  57.     |         |                  entry in the dictionary 
  58.     |         v
  59.     |
  60.     |
  61.     |
  62.     |
  63.     |
  64.     |                   <-- sp@  top of parameter stack
  65.     |         ^
  66.     |         |
  67.     |           parameter stack
  68.     |
  69.    f736 ---------------- s0  bottom of empty parameter stack
  70.     |           tib      starts at tib @ = F736
  71.     |         |
  72.     |         v
  73.     |                    60 hex bytes
  74.     |                    available for tib 
  75.     |                    
  76.     |         ^
  77.     |         | 
  78.     |           return stack  ( not used, system stack is used )
  79.     | -----------------
  80.    f796   6520     0     init-r0 = f796  bottom return stack   
  81.    f798   2020     2         rpp ??  return pointer (not used)
  82.    f79a   3362     4     forth directory pointer 
  83. --------------------------------------
  84.    f79c   f736 >   6     sp0         |
  85.    f79e   f796 >   8     r0          |        
  86.    f7a0   f736 >  10     tib         |
  87.    f7a2     1f >  12     width       |  
  88.    f7a4      1 >  14     warning     |
  89.    f7a6   2dd2 >  16     fence       |
  90.    f7a8   40d8 >  18     dp          |
  91.    f7aa   3c74 >  20     voc-link    |
  92.    f7ac   137c >  22     '-find      |
  93.    f7ae    710 >  24     '?terminal  |
  94.    f7b0   1446 >  26     'abort      |
  95.    f7b2   145e >  28     'block      |
  96.    f7b4   14fe >  30     'cr         |
  97.    f7b6    77c >  32     'emit       |
  98.    f7b8   152e >  34     'expect     |   24 words are copied and saved
  99.    f7ba   1654 >  36     'interpret  |      for use at the next session
  100.    f7bc    6ec >  38     'key        |      by 'freeze'  
  101.    f7be   16ba >  40     'load       |
  102.    f7c0   1722 >  42     'number     |
  103.    f7c2   17a8 >  44     'page       |
  104.    f7c4   17b6 >  46     'r/w        |
  105.    f7c6    736 >  48     'type       |
  106.    f7c8   1848 >  50     'vocabulary |
  107.    f7ca   1904 >  52     'word       |
  108. --------------------------------------
  109.    f7cc     11    54     >in             52 hex bytes = 41 user variables
  110.    f7ce     10    56     base
  111.    f7d0      0    58     blk
  112.    f7d2   23be    60     context
  113.    f7d4   f734    62     csp
  114.    f7d6   23be    64     current
  115.    f7d8   ffff    66     dpl
  116.    f7da      0    68     fld
  117.    f7dc   411a    70     hld
  118.    f7de      0    72     offset
  119.    f7e0     2b    74     out
  120.    f7e2   8747    76     r#
  121.    f7e4   4658    78     scr
  122.    f7e6      0    80     state
  123.    f7e8   7fff    82     first     start of buf1    end of user variables
  124.     |
  125.     |
  126.     |            404 hex bytes for block buffer buf1
  127.     |
  128.     |
  129.    fbec                  starting address of buf2
  130.     |
  131.     |
  132.     |            404 hex bytes for block buffer buf2
  133.     |
  134.     |
  135.    fff0                  limit     ( end of memory )
  136.  
  137.